import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class FriendCell extends StatelessWidget {

  final String image;

  final String name;

  final String letter;

  FriendCell(this.image, this.name, this.letter);

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
      Container(
          height: 60,
          margin: EdgeInsets.only(left: 2,right: 2,top: 1),
          padding: EdgeInsets.only(left: 15),
          decoration: BoxDecoration(
            color: Colors.white,
            borderRadius: BorderRadius.circular(5)
          ),
          child: Row(
            children: [
              Container(
                clipBehavior: Clip.hardEdge,
                  decoration: BoxDecoration(
                    borderRadius: BorderRadius.circular(10),
                ),
                child: image.startsWith('images')?Image(image: AssetImage(image),width: 30,):Image.network(image,width: 50,),
              ),
              SizedBox(width: 10),
              Expanded(child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                  mainAxisAlignment: MainAxisAlignment.end,
                  children: [
                    Container(
                      margin: EdgeInsets.only(bottom: 16),
                      child: Text(name,style: TextStyle(fontSize: 15,color: Colors.black,),),
                    ),
                  ]
              ))
            ],
          )
      )
    ],
    );
  }
  
}